(function ($){

	var popup,hide_action_popup;

	popup = (function () {

		function popup(){};

        //显示popup
        popup.prototype.open_popup = function () {
        	var _this = this;
        	$('body').append('<div class="weui-mask"></div>');
            $('.weui-mask').addClass('weui-animate-fade-in');
		 	_this.addClass('popup_up');
        };

        //关闭popup
        popup.prototype.close_popup = function () {
        	var _this = this;
        	$('.weui-mask').addClass('weui-animate-fade-out');
			$('.weui-mask').remove();
			_this.removeClass('popup_up');
			_this.addClass('popup_down');
        };
		
		return popup;
	})();
	
	/**
     * 添加到$.fn
     */
    $.extend($.fn,{
    	open_popup:new popup().open_popup,
    	close_popup:new popup().close_popup
   	});
})($);